home *** CD-ROM | disk | FTP | other *** search
- //==============================================================================================
- //
- // Windows Interface Construction Set
- // Version 1.00
- //
- // IBUTTON.CPP - Icon Bar Button Class
- // Copyright ⌐ 1993 by Microdyne Development Technologies
- // All rights reserved.
- //==============================================================================================
-
- //----------------------------------------------------------------------------------------------
- // Note: Applications that use this class must load the WICS.DLL before using this class.
- // The WICS.CLL will create and register the WICSButton class that is necessary for
- // this class to work properly.
- //----------------------------------------------------------------------------------------------
-
- #include <ibutton.h>
- #include <wics.h>
-
- //----------------------------------------------------------------------------------------------
- // Constructor for a TIconBarButton object. Initializes its data fields using supplied
- // parameters and default values.
- //----------------------------------------------------------------------------------------------
-
- TIconBarButton::TIconBarButton(PTWindowsObject AParent, int AnId, int X, int Y, BOOL fState, PTModule AModule)
- : TButton(AParent, AnId, NULL, X, Y, 0, 0, FALSE, AModule)
- {
- Attr.Style = WS_CHILD | WS_VISIBLE | WBS_ICONBUTTON ;
- Attr.W = 20;
- Attr.H = 20;
-
- if ( fState )
- Attr.Style |= WBS_STATEBUTTON ;
- }
-
- //----------------------------------------------------------------------------------------------
- // Constructor for a TIconBarButton to be associated with a MS-Windows interface element
- // created by MS-Windows from a resource definition. Initializes its data fields using
- // supplied parameters.
- //----------------------------------------------------------------------------------------------
-
- TIconBarButton::TIconBarButton(PTWindowsObject AParent, int ResourceId, PTModule AModule)
- : TButton(AParent, ResourceId, AModule)
- {
- Attr.Style = WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | 0x800 ;
- }
-
- PTStreamable TIconBarButton::build()
- {
- return new TIconBarButton(streamableInit);
- }
-
- TStreamableClass RegBButton("TIconBarButton", TIconBarButton::build, __DELTA(TIconBarButton));
-